<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>房间新增</title>
     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
    <meta name="renderer" content="webkit">
    <link href="${pageContext.request.contextPath}/static/css/common.css" rel="stylesheet">
    <link href="//cdn.bootcss.com/bootstrap-validator/0.5.3/css/bootstrapValidator.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/css/bootstrap.min.css"
          rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/font-awesome-4.3.0/css/font-awesome.min.css"
          rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/plugins/select2-4.0.0/dist/css/select2.min.css"
          rel="stylesheet"/>

    <script src="${pageContext.request.contextPath}/static/js/jquery-1.11.3.min.js"></script>
	<script src="//cdn.bootcss.com/bootstrap-validator/0.5.3/js/bootstrapValidator.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/bootstrap-3.3.5/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/plugins/select2-4.0.0/dist/js/select2.min.js"></script>
<style>
		.jqGrid_wrapper{*+margin-left:270px;}
	
		.lt,.col-sm-3,.col-sm-8{float:left}
		.form-group{*+overflow:hidden;}
		.form-group label{width:31%\9;*+width:20%;text-align:right\9;*+text-align:right;}
		.col-sm-8 .m-t2 {width:60%\9; *+width:76%;}
		.form-group .col-sm-8{width:66%\9;*+width:66%;}
		.form-group .form-control{*+width:95%;}
		.form-control{*+height:22px;}
		#sub{*+margin-right:10px;}
		.input-group .form-control{*+z-index:-1;}
		.upload{*+position:relative;}
		.btn-primary{*+position:absolute;*+left:431px;*+top:-35px;*+z-index:3;}
		.m-t2  label{width:50px\9;*+width:50px;}
		.col-sm-8 .input-group{width:500px;lwidth:494px\9;}
		.input-group .col-md-1{width:44%;width:46%\9;*+width:38%;float:left;*+height:22px;*+line-height:22px;}
		.input-group .input-group-addon{width:36px;width:36px\9;*+width:36px;height:34px;height:34px\9;line-height:22px;line-height:22px\9;*+height:22px;*+line-height:22px;}
		.m-t2 label{*+width:26px;text-align:left\9;*+text-align:left;}
	</style>
</head>
<body>
<div class="col-sm-12">
    <form class="form-horizontal m-t" id="form" method="post"
          action="${pageContext.request.contextPath}/admin/croom_addUser.action">
         <div class="form-group">
         <input type="hidden" name="sid" id="sid" value="${sid}"/>
            <label class="col-sm-3  control-label"><i class="require">*</i>住户姓名:</label>
            <div class="col-sm-8">
            <input class="form-control" name="userName" id="userName"  size="30" />
            </div>
        </div>
         <div class="form-group">
            <label class="col-sm-3  control-label"><i class="require">*</i>手机号码:</label>
            <div class="col-sm-8">
            <input class="form-control" name="userTel" id="userTel"  size="30" />
            </div>
        </div>
         <div class="form-group">
            <label class="col-sm-3  control-label"><i class="require"></i>身份证号码:</label>
            <div class="col-sm-8">
            <input class="form-control" name="userIdNumber" id="userIdNumber"  size="30" maxlength="18"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label"><i class="require">*</i>住户类型:</label>
            <div class="col-sm-8">
                <div class="col-sm-2 m-t2">
                    <input type="radio" checked name="status" size="30" value="3"/><label>自住</label>
                    <input type="radio" style="margin-left: 50px;" name="status" size="30" value="4"/><label>租客</label>                
                </div>
            </div>
        </div>
        </div>
    </form>
</div>
<script type="text/javascript">
function result(){
	var bootstrapValidator = $("#form").data('bootstrapValidator');
	   bootstrapValidator.validate();
	   return bootstrapValidator.isValid();

}
$(function () {
	$('form').bootstrapValidator({
		message:'this value is not valid',
            fields: {
            	userName: {
                    message: '用户名验证失败',
                    validators: {
                        notEmpty: {
                            message: '用户名不能为空'
                        }
                    }
                },
                userTel: {
                    validators: {
                        notEmpty: {
                            message: '手机号码不能为空'
                        },
                       	stringLength:{
                        	min: 11,
                        	max: 11,
                        	message: '请输入11位手机号码'
                        },
                    regexp:{
                    	regexp: /^1[3|5|8]{1}[0-9]{9}$/,
                    	message: '请输入正确的手机号码'
                    }                       
                    }
                },
                userIdNumber:{
                	validators: {
                       	stringLength:{
                        	min: 18,
                        	max: 18,
                        	message: '请输入18位身份证号码'
                        }
                	}
                }
            }
        });

})
 
</script>
</body>
</html>
